<style type="text/css" scoped="scoped">
    .webContentLeft {
        margin-left: 20px;
        padding: 20px;
        box-sizing: content-box;
        float: left;
        min-width: 20%;;
        max-width: 25%;
        border: 1px solid #bbb;
        border-radius: 5px;
    }

    .webNodeTree {
    }

    .webNodeTree [class^="icon-"] {
        margin-left: 5px;
        font-size: 0.8em;
    }

    .webNodeTree .icon-home {
        color: #94a6ef;
    }

    .webNodeTree .webNodeName {
        cursor: pointer;
        line-height: 20px;
    }

    .webNodeTree .webNodeName span {
        margin-left: 0px;
        font-size: 1.1em;
    }

    .webNodeTree .webNodeName .created {
        margin-left: 3px;
        padding: 1px 4px;
        background-color: #79c9ec;
        color: #848078;
        font-size: 0.8em;
        border-radius: 10px;;
    }

    .webNodeTree .webNodeName.focus {
    }

    .webNodeTree .webNodeName.focus .icon-home {
        color: #46c77d;
    }

    .webContentRight {
        display: inline-block;
        box-sizing: content-box;
        float: left;
        width: 70%;
    }
</style>
<script type="text/javascript">
    var service = new longService('${request.getRequestURI()}');
    service.PANNEL_DETAIL = '.rightPannel';
    service.PANNEL_ADD = '.rightPannel';
    service.showList = function (webNodeId) {
        LC.goPage('system/webContent.action', '.rightPannel', [
            {name: LC.const.ACT, value: LC.const.LIST},
            {name: 'webNodeId', value: webNodeId}]);
    }
    service.tools.toolCancel.click = function(e){
        LC.S.showList($('.webContentRight input[name=webNodeId]').val());
    }
    service.tools.toolNew.click = function (e) {
        LC.S.add([{
            name: 'webNodeId',
            value: $('.webContentRight input[name=webNodeId]').val()
        }], this.callback);
    }
    service.detail = function (webNodeId, id, callback) {
        LC.goPage(LC.S.serviceUrl, LC.S.PANNEL_DETAIL, [
            {name: longController.const.ACT, value: longController.const.DETAIL},
            {name: 'webNodeId', value: webNodeId},
            {name: 'id', value: id}
        ], callback);
    }
    LC.attach('${request.getRequestURI()}', service);
    LC.initToolbar({});
    LC.S.toWebNode = function (_this, webNodeId, type) {
        $('.webNodeTree .focus').removeClass('focus');
        $(_this).addClass('focus');
        console.debug(type);
        switch (type) {
            case 'article':
                break;
            case 'list':
                LC.S.showList(webNodeId);
                break;
            case 'url':
                break;
        }
    }
    $(document).ready(function (e) {
        var webNodeTree = $('.webNodeTree').jTree();
        webNodeTree.showAll();
        LC.S.showList('');
    });
</script>
<div class="webContentLeft">
    <div class="webNodeTree">
        <div id="webNode_0" pid="">
        <span class="webNodeName" onClick="LC.S.toWebNode(this,'','list')">
            <span class="icon-home"></span>
            <span class="name">栏目内容管理</span>
        </span>
        </div>
    <#list webNodes as m>
        <div id="${m._id}" pid="${m.parentId!"webNode_0"}">
        <span class="webNodeName" title="${m.notes!"点击编辑内容"}" onClick="LC.S.toWebNode(this,'${m._id}','${m.type}')">
            <span class="icon-home"></span>
            <span class="name">${m.name}</span>
            <span class="created">${m.created?date}</span>
        </span>
            <span class="icon-edit" title="添加内容" onClick=";//LC.S.add([{name:'parentId',value:'${m._id}'}])"></span>
        </div>
    </#list>
    </div>
</div>
<div class="webContentRight">
<@com.toolbar />
    <div class="rightPannel"></div>
</div>
<div class="clear"></div>